package topo.frame;

import com.zhtelecom.common.snmp.impl.SNMPUtils;
import topo.mibobject.Port;
import topo.table.ObjectTableDesc;

public class MACAndPortDesc implements ObjectTableDesc {
    public Object[] getcolumnNames() {
        String[] cols = { "该设备的主MAC地址", "端口号", "端口号对应的接口号", "MTU", "接收到的帧数", "发送的帧数", "丢弃的帧数" };
        return cols;
    }

    public Object[] getRowDatas(Object obj) {
        Port table = (Port) obj;
        Object[] viDatas = { SNMPUtils.formatDispayMacAddress(table.getDot1dBaseBridgeAddress()), Integer.valueOf(table.getDot1dTpPort()), Integer.valueOf(table.getDot1dBasePortIfIndex()), Integer.valueOf(table.getDot1dTpPortMaxInfo()), Long.valueOf(table.getDot1dTpPortInFrames()), Long.valueOf(table.getDot1dTpPortOutFrames()), Long.valueOf(table.getDot1dTpPortInDiscards()) };
        return viDatas;
    }

    public Class getTableObjectClass() {
        return Port.class;
    }
}